package com.qijian.flowable.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qijian.flowable.domain.FlowableRecord;
import com.qijian.flowable.domain.query.FlowableRecordQuery;
import com.qijian.flowable.domain.vo.ExecRecordVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 流程记录Mapper接口
 *
 * @author qijian
 * @date 2021-09-17
 */
public interface FlowableRecordMapper extends BaseMapper<FlowableRecord> {
    void execRecord(ExecRecordVo vo);

    Page<FlowableRecord> selectVo(Page<FlowableRecord> page, @Param(Constants.WRAPPER) QueryWrapper<FlowableRecordQuery> queryWrapper);

    Page<FlowableRecord> selectVoNew(Page<FlowableRecord> page, @Param(Constants.WRAPPER) QueryWrapper<FlowableRecordQuery> queryWrapper, @Param("param") FlowableRecordQuery query);

    List<FlowableRecord> getHisRecord(String processInstanceId);

    int updateStatusByBack(String processInstanceId);

    String getProjectNoListProcess(@Param(value = "id") Long id);

    String getProjectNoListCraft(@Param(value = "id")Long id);

    String getProjectNoListStr(@Param(value = "id") Long id);

    int updateStatusByReStart(FlowableRecord record);

    int deleteRuTaskByProcessInstanceId(String processInstanceId);
}
